<#assign module="sys"/>

<@override name="header">
</@override>
<@override name="body">

	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					版本设置
			    </div>
			    <div class="panel-body">
    				<form id="submit_form" action="${ctx}/appversion/update" class="form-horizontal" method="post">
		                <input type="hidden" name="appVersionType" value="${appVersion.appVersionType}">
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label">设备：</label>
		                    <div class="col-sm-3">
		                    	<p class="form-control-static">
		                    	<#if appVersion.appVersionType=='androiddriver'>
		                    		安卓司机端
		                    	<#elseif appVersion.appVersionType=='androidcustomer'>
		                    		安卓客户端
		                    	<#elseif appVersion.appVersionType=='iosdriver'>
		                    		ios司机端
		                    	<#elseif appVersion.appVersionType=='ioscustomer'>
		                    		ios客户端
		                    	<#else>
		                    		未知
		                    	</#if>
		                    	</p>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>显示版本号：</label>
		                    <div class="col-sm-3">
		                    	<input class="form-control" id="shortversion" name="shortversion" value="${appVersion.shortversion?if_exists}" type="text" required/>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>比较版本号：</label>
		                    <div class="col-sm-3">
		                    	<input class="form-control" id="buildversion" name="buildversion" value="${appVersion.buildversion?if_exists}" type="number" min="0" required/>
		                    </div>
		                </div>
		                
		                <div class="form-group">
                            <label class="col-sm-3 control-label">是否强制更新：</label>
                            <div class="col-sm-7">
                                <label>
								  <input type="checkbox" name="mandatory" <#if appVersion.mandatory??>${appVersion.mandatory?string('checked="checked"','')}</#if> />
								</label>
                            </div>
                        </div>
                        
                        <div class="form-group">
		                    <label class="col-sm-3 control-label">App大小(kb)：</label>
		                    <div class="col-sm-3">
		                    	<input class="form-control" id="appsize" name="appsize" value="${appVersion.appsize?if_exists}" type="number" min="0"/>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>下载地址：</label>
		                    <div class="col-sm-3">
		                    	<input class="form-control" id="downloadurl" name="downloadurl" value="${appVersion.downloadurl?if_exists}" type="url"/>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>标题：</label>
		                    <div class="col-sm-3">
		                    	<input class="form-control" id="title" name="title" value="${appVersion.title?if_exists}" type="text" required/>
		                    </div>
		                </div>
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>更新内容：</label>
		                    <div class="col-sm-8">
		                    	<textarea class="form-control" cols="20" rows="10" id="notes" name="notes" rows="2" required>${appVersion.notes?if_exists}</textarea>
		                    </div>
		                </div>

						<div class="form-group">
							<label class="col-sm-3 control-label">是否发布：</label>
							<div class="col-sm-7">
								<label>
									<input type="checkbox" name="currentVersion" <#if appVersion.currentVersion??>${appVersion.currentVersion?string('checked="checked"','')}</#if> />
								</label>
							</div>
						</div>
		                
		                <div class="form-group" style="margin-left:10px;">
			                <label class="col-sm-3 control-label"></label>
			                <input id="submit_button" type="submit" class="btn btn-primary" value="更新">
			                <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/appversion/list';" value="返回">
			            </div>
					</form>
        		</div>
			</div>
		</div>
	</div>

</@override>
<@override name="footer">
<script type="text/javascript">
	$(document).ready(function(){
		
	
	});
</script>
</@override>
<@extends name="../layout.ftl"/>